const a = async function (
  data,
  _,
  { $grid, dayjs, dc: { http, store }, xe: { mapTree } }
) {
  console.log("custom load: ", data);
  const { dtime } = data;
  const year = dayjs(store.get("user", "date")).format("YYYY");
  const params = { ...data, year };
  if (dtime) {
    const [dYear, Dmouth] = dtime.split("-");
    params.year = dYear;
    params.dtime = dYear + Dmouth;
  }
  const { data: items, total } = await http.post({
    url: "/nyk/search/listNlsZjzc",
    params,
  });

  const unit = data.local.unit ?? 10000;
  console.log("unit", unit, params);
  mapTree($grid.columns, function (it) {
    const isMoneyField =
      it.formatter && (it.formatter == "money" || it.formatter[0] == "money");
    if (isMoneyField) it.formatter = ["money", unit];
    return it;
  });
  return { items, total };
};


